package com.hx.study.service.impl;

import java.util.List;

import com.hx.study.domain.PaperRepository;
import com.hx.study.mapper.PaperRepositoryMapper;
import com.hx.study.service.IPaperRepositoryService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

/**
 * 考试题库Service业务层处理
 *
 * @author user
 * @date 2022-06-06
 */
@Service
public class PaperRepositoryServiceImpl implements IPaperRepositoryService {
    @Autowired
    private PaperRepositoryMapper paperRepositoryMapper;

    /**
     * 查询考试题库
     *
     * @param id 考试题库主键
     * @return 考试题库
     */
    @Override
    public PaperRepository selectPaperRepositoryById(Integer id) {
        return paperRepositoryMapper.selectPaperRepositoryById(id);
    }

    /**
     * 查询考试题库列表
     *
     * @param paperRepository 考试题库
     * @return 考试题库
     */
    @Override
    public List<PaperRepository> selectPaperRepositoryList(PaperRepository paperRepository) {
        return paperRepositoryMapper.selectPaperRepositoryList(paperRepository);
    }

    /**
     * 新增考试题库
     *
     * @param paperRepository 考试题库
     * @return 结果
     */
    @Override
    public int insertPaperRepository(PaperRepository paperRepository) {
        return paperRepositoryMapper.insertPaperRepository(paperRepository);
    }

    /**
     * 修改考试题库
     *
     * @param paperRepository 考试题库
     * @return 结果
     */
    @Override
    public int updatePaperRepository(PaperRepository paperRepository) {
        return paperRepositoryMapper.updatePaperRepository(paperRepository);
    }

    /**
     * 批量删除考试题库
     *
     * @param ids 需要删除的考试题库主键
     * @return 结果
     */
    @Override
    public int deletePaperRepositoryByIds(Integer[] ids) {
        return paperRepositoryMapper.deletePaperRepositoryByIds(ids);
    }

    /**
     * 删除考试题库信息
     *
     * @param id 考试题库主键
     * @return 结果
     */
    @Override
    public int deletePaperRepositoryById(Integer id) {
        return paperRepositoryMapper.deletePaperRepositoryById(id);
    }
}
